#ifndef MYTHREAD_H
#define MYTHREAD_H

#include <QObject>
#include <QVector>

// 这个线程类目的是：生成随机数
class Generate : public QObject
{
    Q_OBJECT
public:
    explicit Generate(QObject *parent = nullptr);

    void working(int num);

signals:
    void sendArray(QVector<int> num);

public slots:
};

// 冒泡排序
class BubbleSort : public QObject
{
    Q_OBJECT
public:
    explicit BubbleSort(QObject *parent = nullptr);

    void working(QVector<int> list);

signals:
    void finish(QVector<int> num);

public slots:
};

// 快速排序
class QuickSort : public QObject
{
    Q_OBJECT
public:
    explicit QuickSort(QObject *parent = nullptr);

    void working(QVector<int> list);

    // 私有的快速排序的成员函数
private:
    void quickSort(QVector<int> &list,int left,int right);

signals:
    void finish(QVector<int> num);

public slots:
};

#endif // MYTHREAD_H
